package com.wangxiaotao.Service;

import com.wangxiaotao.Dao.AdminDao;
import com.wangxiaotao.Pojo.Goods;
import com.wangxiaotao.Pojo.Order;
import com.wangxiaotao.Pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {
    @Autowired
    AdminDao adminDao;

    public void deleteoder(int order_id) {
        adminDao.deleteoder(order_id);
    }

    public List<Order> getoderlist() {
        return adminDao.getoderlist();
    }

    public void setisok(int order_id) {
        adminDao.setisok(order_id);
    }

    public void updataorder(Order user_order) {
        adminDao.updataorder(user_order);
    }

    public void addoeder(Order order) {
        adminDao.addoeder(order);
    }

    public Order getordernum() {
        return adminDao.getordernum();
    }

    public List<Order> isokorders() {
        return adminDao.isokorders();
    }

    public List<Order> unisokorders() {
        return adminDao.unisokorders();
    }

    public List<Order> allorders() {
        return adminDao.allorders();
    }

    public List<Goods> getallgoods() {
        return adminDao.getallgoods();
    }

    public List<Goods> getmeishigoods() {
        return adminDao.getmeishigoods();
    }

    public List<Goods> getyinpingoods() {
        return adminDao.getyinpingoods();
    }

    public List<Goods> getshuiguogoods() {
        return adminDao.getshuiguogoods();
    }

    public void deletefood(int goods_id) {
        adminDao.deletefood(goods_id);
    }

    public void updatagoods(Goods goods) {
        adminDao.updatagoods(goods);
    }

    public List<User> getalluser() {
        return adminDao.getalluser();
    }

    public void updatauser(User user) {
        adminDao.updatauser(user);
    }

    public void deleteuser(int user_id) {
        adminDao.deleteuser(user_id);
    }

    public void addgoods(Goods goods) {
        adminDao.addgoods(goods);
    }

    public Goods getmaxgoodid() {
        return  adminDao.getmaxgoodid();
    }
}
